Connect electric-indent-mode up with CC Mode. Bug #15478.
authorAlan Mackenzie <acm@muc.de>
Mon, 17 Feb 2014 18:16:32 +0000 (18:16 +0000)
committerAlan Mackenzie <acm@muc.de>
Mon, 17 Feb 2014 18:16:32 +0000 (18:16 +0000)
commit3f6cc4ca770562923ddba2d583c0b03597e84708
treef3c371a70b5dd2372772b32844c4a02ad5254730
parent441a8736f0c703a35b2b177a572baaa0bff3b51a
Connect electric-indent-mode up with CC Mode.  Bug #15478.
* progmodes/cc-mode.el (c-initialize-cc-mode): add CC Mode hooks
to electric-indent-{,local-}-mode.
(c-basic-common-init): Set electric-indent-inhibit.  Initialise
c-electric-flag from electric-indent-mode.
(c-electric-indent-mode-hook, c-electric-indent-local-mode-hook):
New hook functions which propagate electric-indent-mode to CC Mode.

* progmodes/cc-cmds.el (c-toggle-electric-state): When C-c C-l is
hit, toggle electric-indent-local-moode.

* electric.el (electric-indent-mode-has-been-called): New variable.
lisp/ChangeLog
lisp/electric.el
lisp/progmodes/cc-cmds.el
lisp/progmodes/cc-mode.el